import { NextApiRequest, NextApiResponse } from 'next'


interface Item {
  key: string;
  name: string;
  age: number;
  address: string;
}

export default async function handle(
  req: NextApiRequest,
  res: NextApiResponse
) {
  const { method, body } = req
  const originData: Item[] = [];
  for (let i = 0; i < 100; i++) {
    originData.push({
      key: i.toString(),
      name: `Edward ${i}`,
      age: 32,
      address: `London Park no. ${i}`,
    });
  }

  return res.status(200).json({ success: true, data: originData })
}
